package com.wxx.猜数字;

/**
 * @author: Jetwang
 * @date: 2022/3/27 22:03
 * @description: Solution 猜数字
 * @version: 1.0
 */
public class Solution {
    public static  int game(int[] guess, int[] answer) {
        int count = 0;
        for (int i = 0; i < 3; i++) {
            if (guess[i] == answer[i]) {
                count += 1;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        int count = game(new int[]{1, 2, 3}, new int[]{3,2,1});
        System.out.println(count);
    }
}
